package com.gla.giliair.web;

import com.gla.giliair.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @Description:
 * @Author: Yingtian qian
 * @Date: 2021/8/23 15:12
 */
public class BaseController {
    @Autowired
    public UserService userService;

    @Autowired
    public AdminService adminService;

    @Autowired
    public FlightService flightService;

    @Autowired
    public OrderService orderService;

    @Autowired
    public AlipayService alipayService;

    @Autowired
    public SeatService seatService;

    @Autowired
    public DelayService delayService;

    @Autowired
    public CompanyService companyService;

    @Autowired
    public CompanyPlanemodelService companyPlanemodelService;

    @Autowired
    public PlanemodelService planemodelService;

    @Autowired
    public StaticSeatService staticSeatService;

    @Autowired
    public DiscountService discountService;

    @ExceptionHandler
    public String handleException(Exception exception) {
        exception.printStackTrace();
        return "{\n" +
                "  \"msg\": \"" + exception.getMessage() + "\",\n" +
                "  \"status\": 550\n" +
                "}";
    }
}
